function initializeParamFields(paramBlock)
{
	paramBlock.find('.single_field_block').click(function(){
		var fieldBlock = $(this);
		if (fieldBlock.data('inprogress') || !fieldBlock.hasClass('field_closed')) return;

		fieldBlock.data('inprogress', true);
		
		var fieldInputBlock = fieldBlock.find('.block-field');
		if (fieldInputBlock.data('fieldHTML'))
		{
			fieldInputBlock.html(fieldInputBlock.data('fieldHTML'));
			fieldInputBlock.slideDown('fast', function(){
				fieldBlock.removeClass('field_closed');
				fieldBlock.data('inprogress', false);
			});
		}
		else
		{
            $.getJSON(
            		paramBlock.find(':input[name=new_field_link]').val(),	
					{
            			'groupname': fieldBlock.closest('.params_data_group').find(':input[name=group_name]').val(),
						'fieldname': fieldBlock.find(':input[name=field_name]').val(),
						'fieldlang': fieldBlock.find(':input[name=field_lang]').val(),
						'fieldparamspath': paramBlock.find(':input[name=field_params_path]').val()
					},
					function(data){
						HandleResponseJSON(data, function(data){
							fieldInputBlock.html(data.value);
							fieldInputBlock.slideDown('fast', function(){
								fieldBlock.removeClass('field_closed');	
								fieldBlock.data('inprogress', false);
								fieldBlock.attr('title', '');
							});
						});
					}
				);			
		}	
	});

	paramBlock.find('.icon-del').click(function(e){
		e.preventDefault();
		e.stopPropagation();
		var fieldBlock = $(this).closest('.single_field_block');
		
		if (fieldBlock.data('inprogress')) return;
		
		fieldBlock.data('inprogress', true);
		
		var fieldInputBlock = fieldBlock.find('.block-field');
		fieldInputBlock.slideUp('fast', function(){
			fieldBlock.addClass('field_closed');
			
			fieldInputBlock.data('fieldHTML', fieldInputBlock.find('> *'));
			fieldInputBlock.html('');
			
			fieldBlock.data('inprogress', false);
		});
	});	

}